<?php

class BillNotify {
	
    /**
     * 
     * 判断签名结果是否一致
     * @param string $mac
     */
    public static function checkSign($params){
	    if(empty($_POST)) {//判断POST来的数组是否为空
			return false;
		}else {
			$_POST['merchant_key'] = $params['merchant_key'];
			//生成签名结果
			$mymac = BillSign::notifySign($_POST);
			$succeed = $_POST['succeed'];
			if ($succeed =="Y" && $mymac == $_POST['mac']){
				return true;
			}else{
				return false;
		 	}
		}
    }
}

?>